package model

import (
	"gorm.io/gorm"
	"time"
)

type Follow struct {
	Id         uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	FormUserId uint           `gorm:"column:form_user_id;type:bigint(20) UNSIGNED;comment:用户1;not null;default:0;" json:"form_user_id"`  // 用户1
	ToUserId   uint           `gorm:"column:to_user_id;type:bigint(20) UNSIGNED;comment:用户2;not null;default:0;" json:"to_user_id"`      // 用户2
	Status     uint           `gorm:"column:status;type:bigint(20) UNSIGNED;comment:状态 1:实现关注 2:取消关注;not null;default:0;" json:"status"` // 状态 1:实现关注 2:取消关注
	CreatedAt  time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (f *Follow) TableName() string {
	return "follow"
}
